package com.rem.spring.annotionTx;

import com.rem.spring.annotionTx.config.Config;
import com.rem.spring.entity.Emp;
import com.rem.spring.annotionTx.service.EmpService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;


/**
 * @author Rem
 * @date 2023/3/7
 */
@SpringJUnitConfig(classes = Config.class)
public class AnnoTxTest {

    @Autowired
    private EmpService empService;

    @Test
    public void testBuyBook() {
        Emp emp = new Emp();
        emp.setId(1);
        emp.setName("aaa");
        emp.setAge(11);
        emp.setSex("nv");
        empService.updateEmpById(emp);

    }
}
